﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace tranquility
{
    public class Trap : Microsoft.Xna.Framework.DrawableGameComponent
    {

     #region Properties

        public Model trapModel;
        public Vector3 Position { get; set; }
        public float Rotation = 0.0f;

     #endregion


       public Trap(Game game)
            : base(game)
        {
            // TODO: Construct any child components here
        }


       protected override void LoadContent()
       {
           //model = Game.Content.Load<Model>("name"); 
           base.LoadContent();
       }
                /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            foreach (ModelMesh mesh in trapModel.Meshes)
            {
                foreach (BasicEffect effect in mesh.Effects)
                {
                    effect.World = Matrix.Identity;
                    effect.EnableDefaultLighting();
                    effect.Projection =
                      Matrix.CreatePerspectiveFieldOfView(
                           MathHelper.ToRadians(45.0f),
                           GraphicsDevice.Viewport.AspectRatio,
                           1.0f, 10000.0f
                      );
                }
            }

        }
    }
}
